<h1>New product</h1>

<% form_for :product, @product, :url => {:action => :create} do |f|%>
  <%= f.error_messages %>
  <table>
      <tr>
          <td><%=f.label :name, 'Product Name: ' %></td>
          <td><%=f.text_field :name %></td>
      </tr>
      <tr>
          <td><%=f.label :title, 'Product Title: ' %></td>
          <td><%=f.text_field :title %></td>
      </tr>
      <tr>
          <td><%=f.label :description, 'Description: '%></td>
          <td><%=f.text_area :description %></td>
      </tr>
      <tr>
          <td><%=f.label :image_url, 'Image Url:'%></td>
          <td><%=f.text_field :image_url %></td>
      </tr>
      <tr>
          <td><%= f.label :price, 'Price: '%></td>
          <td><%=f.text_field :price %></td>
      </tr>
  </table>
  <p>
    <%= submit_tag :Create %>
  </p>
<% end %>

<%= link_to 'Back', products_path %>
